package org.dyk.seamanshousefrontdesk.service.goods;

import org.dyk.seamanshousefrontdesk.model.Goods;
import org.dyk.seamanshousefrontdesk.repository.GoodsRepository;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class GoodsServiceImpl implements GoodsService{
    @Autowired
    private GoodsRepository goodsRepository;

    /**
     * 查询所有商品的集合
     * @return
     */
    @Override
    public List<Goods> findAll() {
        return goodsRepository.findAll();
    }

    @Override
    public Goods findByGid(int gid) {
        return goodsRepository.findByGid(gid);
    }
}
